﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using daSyntaxAnalyser.SyntaxTree;

namespace CQLQueries.SyntaxTree
{
    public class Relation2Node
    {
        public object NodeTree;
        public object ValueUp;

        public Relation4Node Relation4;
        public Relation3Node Relation3;

        public Relation2Node()
        {            
        }

        public void Visit()
        {
            Relation4.NodeTree = NodeTree;
            Relation4.Visit();
            if (Relation3 != null)
            {
                Relation3.ValueDown = Relation4.ValueUp;
                Relation3.NodeTree = NodeTree;
                Relation3.Visit();
                ValueUp = Relation3.ValueUp;
            }
            else ValueUp = Relation4.ValueUp;
        }
    }
}
